﻿package Message.Public
{
    import Framework.MQ.*;
    import Framework.Serialize.*;

    public class SMiniGuildInfo extends IMessageBase
    {
        public var guildId:int;
        public var guildName:String;
        public var purpose:String;
        public var camp:int;
        public var leaderName:String;
        public var level:int;
        public var campLevel:int;
        public var playerNum:int;
        public var maxPlayerNum:int;
        public var rank:int;
        public var leaderVIP:int;
        public var combat:int;
        public var score:int;
        public var branch:Array;
        public var nextPickUpDt:Date;
        public var leader:SMiniPlayer;
        public var guildType:int;
        public const _type:int = 5080;
        public static var _regist:SMiniGuildInfo = new SMiniGuildInfo(true);

        public function SMiniGuildInfo(param1:Boolean = false)
        {
            if (param1)
            {
                MessageManager.instance().regist(this);
            }
            return;
        }// end function

        override public function getType() : int
        {
            return this._type;
        }// end function

        override public function clone() : IMessageBase
        {
            return new SMiniGuildInfo();
        }// end function

        override public function __write(param1:SerializeStream) : void
        {
            param1.writeInt(this.guildId);
            param1.writeString(this.guildName);
            param1.writeString(this.purpose);
            param1.writeByte(this.camp);
            param1.writeString(this.leaderName);
            param1.writeByte(this.level);
            param1.writeInt(this.campLevel);
            param1.writeByte(this.playerNum);
            param1.writeByte(this.maxPlayerNum);
            param1.writeInt(this.rank);
            param1.writeInt(this.leaderVIP);
            param1.writeInt(this.combat);
            param1.writeInt(this.score);
            SeqBranchGuildInfoHelper.write(param1, this.branch);
            param1.writeDate(this.nextPickUpDt);
            this.leader.__write(param1);
            param1.writeInt(this.guildType);
            return;
        }// end function

        override public function __read(param1:SerializeStream) : void
        {
            this.guildId = param1.readInt();
            this.guildName = param1.readString();
            this.purpose = param1.readString();
            this.camp = param1.readByte();
            this.leaderName = param1.readString();
            this.level = param1.readByte();
            this.campLevel = param1.readInt();
            this.playerNum = param1.readByte();
            this.maxPlayerNum = param1.readByte();
            this.rank = param1.readInt();
            this.leaderVIP = param1.readInt();
            this.combat = param1.readInt();
            this.score = param1.readInt();
            this.branch = SeqBranchGuildInfoHelper.read(param1);
            this.nextPickUpDt = param1.readDate();
            this.leader = new SMiniPlayer();
            this.leader.__read(param1);
            this.guildType = param1.readInt();
            return;
        }// end function

    }
}
